<template>
  <div>
    <div>{{ this.$store.state.count }}</div>
    <div>{{ count }}</div>
    <p>{{ count }}</p>
    <childA></childA>
    <childB></childB>
  </div>
</template>

<script>
import childA from "./components/child-a.vue";
import childB from "./components/child-b.vue";
import { mapState } from "vuex";
export default {
  components: {
    childA,
    childB,
  },
  computed: {
    count() {
      return this.$store.state.count;
    },
    ...mapState(["count"]),
  },
};
</script>

<style></style>
